<script type="text/javascript">
function checkvalue()
{
	if (document.fortopm.description.value=="")
	{ 
		alert("<{$lang.comments_nocontent}>") 
		return false;  
	}  
	else 
		return true; 
}
</script>
<div class="common_box">
<{if $smarty.get.type==1}>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> <td class="guide_ba"><span><{$lang.comments_results}></span></td></tr>
		<tr><td><div style="height:200px; padding:50px;"><{$lang.comments_msg}></div></td></tr>
	</table>
<{else}>
<form method="post" action="" name="fortopm">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> <td class="guide_ba" colspan="3"><span><{$lang.comments_results}></span></td></tr>
        <{foreach key=key item=lb from=$liebiao}>
        <tr>
          <td colspan="2" style="border-right:none; border-top:none; border-left:none;">
		  <b><{$key+1}>:<{$lb.name}></b>
          <{if $lb.subcat.0.name==''}>
               <{$lb.point}>
            <{/if}>
			</td>
        </tr>
        	<{foreach key=key item=zlb from=$lb.subcat}>
			<tr>
			  <td height="20" style="border:0px; padding-left:20px;"><{$zlb.name}></td>
			  <td width="86%" style="border:0px;">
			  <div style="background:#FFF7D2; height:15px;">
			  <div style="background-color:#FFA40D; height:15px;width:<{$zlb.point+0}>%">&nbsp;</div></div>
			  </td>
			</tr>
           	<{/foreach}>
        <{/foreach}> 
        <tr>
          <td height="19" colspan="2" style="border-top:none; border-left:none; border-right:none; font-weight:bold;"><{$lang.all_comments}></td>
      	</tr>
        <tr>
          <td height="56" colspan="2" valign="top" style="border-left:none; border-right:none;">
			<{foreach item=deslist from=$comments_des}>
				<div style="border-bottom:1px dashed #CCCCCC; padding-left:10px;">
				<{$deslist.con}><br />
				<em><a href='shop.php?uid=<{$deslist.uid}>'><{$deslist.user}></a></em> <span style="color:#CCCCCC; font-size:10px;"><{$deslist.time|date_format}></span>
				</div>
			<{/foreach}>
		  </td>
      </tr>
    </table>
	
	
	
	
	
	
	
	
	
	
	 <{if $smarty.cookies.USER}>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
         <td class="guide_ba" colspan="2"><span><{$lang.comments_option}></span></td>
          </tr>
         <{foreach key=key item=lb from=$liebiao}>
        <tr>
          <td height="20" colspan="2" style="border-top:none; border-left:none; border-right:none;">
		  	<b><{$key+1}>:<{$lb.name}></b>
			<{if $lb.subcat.0.name==''}>
			  <input checked="checked" name="point[<{$lb.id}>]" id="<{$lb.id}>" type="radio" value="100" />
			  <img width="36" align="absmiddle" height="12" src="http://localhost/b2b/image/default/star1.gif" alt="">
			  <input name="point[<{$lb.id}>]" id="<{$lb.id}>" type="radio" value="70" />
			  <img width="36" align="absmiddle" height="12" src="http://localhost/b2b/image/default/star2.gif" alt="">
			  <input name="point[<{$lb.id}>]" id="<{$lb.id}>" type="radio" value="30" />  
			  <img width="36" align="absmiddle" height="12" src="http://localhost/b2b/image/default/star3.gif" alt=""> 
			<{/if}>
			</td>
          </tr>
            <{foreach key=key item=zlb from=$lb.subcat}>
            <tr>
              <td width="12%" height="20" style="border:0px; padding-left:20px;"><{$zlb.name}></td>
              <td width="88%" style="border:0px;">
			  <input checked="checked" name="point[<{$zlb.id}>]" id="<{$zlb.id}>" type="radio" value="100" />
			  <img width="36" align="absmiddle" height="12" src="http://localhost/b2b/image/default/star1.gif" alt="">
			  <input name="point[<{$zlb.id}>]" id="<{$zlb.id}>" type="radio" value="70" />
			  <img width="36" align="absmiddle" height="12" src="http://localhost/b2b/image/default/star2.gif" alt="">
			  <input name="point[<{$zlb.id}>]" id="<{$zlb.id}>" type="radio" value="30" />  
			  <img width="36" align="absmiddle" height="12" src="http://localhost/b2b/image/default/star3.gif" alt=""> 
			  </td>
            </tr>
            <{/foreach}>
        <{/foreach}> 
        <tr>
        <td colspan="2" style="border-left:none; border-right:none; padding-left:20px;">
          <textarea style="font-size:12px; width:600px; color:#333333;" name="description" id="description" rows="4"></textarea>
		  <br />
		  	<input type="submit" name="submit" id="submit" value="<{$lang.comments_submit}>" onclick="return checkvalue();"/>
	    	<input type="hidden" name="touid" id="touid" value="<{$smarty.get.uid}>" />
		  </td>
        </tr>
    </table>
     <{/if}>
</form>
<{/if}> 
</div>